﻿Public Class frmCodeSample
    Public Sub ShowSample(ByVal codeImage As Image, ByVal title As String)
        'Set the title of the form
        Me.Text = title

        'set the image to display
        Me.PictureBox1.Image = codeImage

        'size the form to match the size of the image, plus some padding.
        'This will help keep the image from being distorted when viewed
        Me.Size = New Size(codeImage.Width + 10, codeImage.Height + 35)
    End Sub
End Class